﻿/*
 * Please leave this Copyright notice in your code if you use it
 * Written by Decebal Mihailescu [http://www.codeproject.com/script/articles/list_articles.asp?userid=634640]
 */
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace FreeTranslator
{
    public partial class MessageBoxEx : Form
    {
        //private Form _owner;
        //private MessageBoxEx(IWin32Window owner)
        //{
        //    _owner = owner as Form;
        //    InitializeComponent();
        //}
        private MessageBoxEx()
        {
            InitializeComponent();
        }

        private void MessageBoxEx_Load(object sender, EventArgs e)
        {
            _txtboxMsg.SelectionStart = 0;
            _txtboxMsg.SelectionLength = 0;
        }

        static internal bool ShowDlg(IWin32Window owner, String message, string title, out bool blaunch, string strExtra = "Launch 'Regional and Language options' Applet")
        {
            bool res = false;
            blaunch = false;
            using (MessageBoxEx msgbox = new MessageBoxEx())
            {
                msgbox.Text = title;
                msgbox._txtboxMsg.Text = message;
                msgbox._ckboxApplet.Text = strExtra;
                msgbox.ShowDialog(owner);
                res = msgbox._ckbxShow.Checked;
                blaunch = msgbox._ckboxApplet.Checked;

            }
            return res;
        }

    }
}
